Ext.define('ProjectAON.view.peerEvaluatie.Scherm38', {
    extend:'Ext.panel.Panel',
    alias:'widget.scherm38',

    title:'scherm38',


    initComponent:function () {
        function renderRadioBox(val, meta, record, rowIndex, colIndex, store){
            var name="radiogroup"+rowIndex+"-";
            var a = '<input type= "radio" name="'+ name + 1 + '" value=" = 1" > = 1  </><input type= "radio" name="'+ name + 2 + '" value=" = 2" > = 2  </><input type= "radio" name="'+ name + 3  + '" value=" = 3" > = 3  </><input type= "radio" name="'+ name + 4 + '" value=" = 4" > = 4  </>';
            return a;
        }

        Ext.applyIf(this, {
            layout:'border',
            items:[
                {
                    collapsible:false,
                    region:'north',
                    resizable:false,
                    xtype:'panel',
                    items:[
                        {
                            xtype:'button',
                            text:'Terug',
                            icon:'http://whatisextjs.com/BAHO/icons/page_back.png',
                            action:'back'
                        },
                        {
                            xtype:'button',
                            text:'Verstuur'
                        }
                    ]
                },
                {
                    collapsible:false,
                    autoScroll:true,
                    region:'center',
                    layout:'fit',
                    items:[
                        {
                            xtype:'grid',
                            flex:1,
                                    id:'gridPanelHoofd',
                                    titleCollapse:true,
                                    columns:[
                                        {header:'Leerling', dataIndex:'naam', flex:1},
                                        {header: "Score (1 = Zeer Goed, 2 = Goed, 3 = Voldoende, 4 = Onvoldoende", hideable:false, flex:2, renderer:renderRadioBox,
                                            editor: {
                                                xtype:'radio'
                                            }
                                        }
                                    ],

                                    store:'Leerling'
                                }
                    ]
                }
            ]
        });


        this.callParent(arguments);
    }
});